<template>
	<view>
		<button @tap="userLogout" class="cu-btn block bg-blue margin-tb-sm lg">注销</button>
	</view>
</template>

<script>
	import {
		mapState,mapMutations
	}from 'vuex' 
	export default {
		computed:{
			...mapState(['hasLogin','userInfo','webUrl']),
		},
		data() {
			return {
				
			}
		},
		methods: {
			...mapMutations(['logout']),
			userLogout(){
				
				this.logout(this.userInfo.id);
				uni.navigateTo({
					url:"../home/home"
				})
				
			}
			
			
		}
	}
</script>

<style>

</style>
